<script type="text/javascript">
$('form').submit(function() {
  if(!$('form').validationEngine({returnIsValid:true})===false){
        $("#body").load($(this).attr("action"),$(this).serialize(),function(){$('#example').dataTable()});
    }
  return false;
});
</script>
<form action="index.php?page=lookups&action=save&module=<?php echo $_REQUEST['module']?>" method="post">
    <table>
        <tr>
            <td>
                 <?php echo $_REQUEST['module']?> name
            </td>
            <td>
                <input type="text" name="name"  id="name" class="validate[required,length[0,50]]" <?php if(isset($lookup)) echo "value ='".$lookup->name."' ";?>/>
                <?php if(isset($lookup->id)) echo "<input type='hidden' name='id' id='id' value='{$lookup->id}'";?>
            </td>
        </tr>
        <tr>
            <td>
                <input type="submit" value="save"/>
            </td>
        </tr>
    </table>
</form>
